public function TablesGetIds(tables) result(ids)
Return a list of Ids from TableCollection
Arguments:
tables
collections of tbles
Result:
Return Ids
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
type(TableCollection),
|
intent(in) |
|
|
:: |
tables |
|
Return Value
character(len=30), ALLOCATABLE, (:)
Variables
Type |
Visibility | Attributes |
|
Name |
| Initial | |
integer(kind=short),
|
public |
|
:: |
i |
|
|
|
Source Code
FUNCTION TablesGetIds &
( tables ) &
RESULT (ids)
IMPLICIT NONE
! Arguments with intent(in):
TYPE (TableCollection), INTENT (IN) :: tables
! Local declarations:
CHARACTER (LEN = 30), ALLOCATABLE :: ids (:)
INTEGER (KIND = short) :: i
!------------end of declaration------------------------------------------------
!allocate array
IF ( ALLOCATED (ids) ) THEN
DEALLOCATE (ids)
END IF
ALLOCATE ( ids (tables % number) )
DO i = 1, tables % number
ids (i) = tables % elem (i) % id
END DO
RETURN
END FUNCTION TablesGetIds